<template>
    <div @click.stop="emits('click')" style="cursor: pointer">
        <el-icon size="20">
            <component :is="icon"></component>
        </el-icon>
    </div>
</template>

<script lang="ts" setup>
import type { Component } from 'vue'
import { computed } from 'vue'
const props = defineProps<{ name: string | Component }>()
const emits = defineEmits(['click'])
const icon = computed(() => {
    return props.name
})
</script>

<style scoped lang="scss"></style>
